package org.hdax.service.impl;

import org.hdax.dao.RoleDao;
import org.hdax.entity.Role;
import org.hdax.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDao roleDao;

    @Override
    public List<Role> getAll() {
        return roleDao.getAll();
    }

    @Override
    public List<Role> getByPage(int offset, int limit, Role condition) {
        return roleDao.getByPageAndC(condition,offset,limit);
    }

    @Override
    public int getCount(Role condition) {
        return roleDao.getCountAndC(condition);
    }
}
